import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 黎鹤舞
 * Date: 2024-04-06
 * Time: 21:42
 */
public class Test {
    public class Main {
        public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            int n = scanner.nextInt();
            int m = scanner.nextInt();
            int k = scanner.nextInt();
            int count = 0;
            for(int i = 0; i < n ; i++) { //一共有n个长度为m的字符串
                String s = scanner.next();  //获取字符串信息
                count += countOnes(s);  //获取每个字符串1的个数
            }
            int x = count - (2*k);
            int y = k - x;
            System.out.println(x+""+y);
        }
        public static int countOnes(String s) {
            int count = 0;
            for(int i = 0; i < s.length(); i++) {
                if('1' == s.charAt(i)) {
                    count++;
                }
            }
            return count;
        }
}
